package com.woyou.bean;

/**
 * 地址模型
 * 
 * @author lenovo
 * 
 */
@SuppressWarnings("serial")
public class MyAddress extends SuperBean {
	/**
	 * 地址ID
	 */
	private String addrId;
	/**
	 * 地址名称
	 */
	private String addrName;
	/**
	 * 街道名称
	 */
	private String street;
	/**
	 * 联系人
	 */
	private String contact;
	/**
	 * 性别 2：男 1：女
	 */
	private int sex;
	/**
	 * 手机号码
	 */
	private String phone;
	/**
	 * 地址所在城市ID
	 */
	private String cityCode;
	/**
	 * 地址所在城市名称
	 */
	private String cityName;
	/**
	 * 地址所在纬度
	 */
	private String lat;
	/**
	 * 地址所在经度
	 */
	private String lng;
	/**
	 * 地址状态（1：新增；2：删除；3：修改）服务器根据每条记录的状态做相应的操作，状态为0则不作任何改变
	 */
	private int state;

	public String getAddrId() {
		return addrId;
	}

	public void setAddrId(String addrId) {
		this.addrId = addrId;
	}

	public String getAddrName() {
		return addrName;
	}

	public void setAddrName(String addrName) {
		this.addrName = addrName;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public int getSex() {
		return sex;
	}

	public void setSex(int sex) {
		this.sex = sex;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	public String getCityName() {
		return cityName;
	}

	public void setCityName(String cityName) {
		this.cityName = cityName;
	}

	public String getLat() {
		return lat;
	}

	public void setLat(String lat) {
		this.lat = lat;
	}

	public String getLng() {
		return lng;
	}

	public void setLng(String lng) {
		this.lng = lng;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((addrName == null) ? 0 : addrName.hashCode());
		result = prime * result
				+ ((cityName == null) ? 0 : cityName.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MyAddress other = (MyAddress) obj;
		if (addrName == null) {
			if (other.addrName != null)
				return false;
		} else if (!addrName.equals(other.addrName))
			return false;
		if (cityName == null) {
			if (other.cityName != null)
				return false;
		} else if (!cityName.equals(other.cityName))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "MyAddress [addrId=" + addrId + ", addrName=" + addrName
				+ ", street=" + street + ", contact=" + contact + ", sex="
				+ sex + ", phone=" + phone + ", cityCode=" + cityCode
				+ ", cityName=" + cityName + ", lat=" + lat + ", lng=" + lng
				+ ", state=" + state + "]";
	}

}
